<template>
  <div>
    <commentListItem 
      :commentData="commentData"  
      :infoData="infoData"
      v-for="commentData in commentList" :key="commentData.commentId">
    </commentListItem>
    <div class="comment_more_box">
      
    </div>
    <page 
        :pageData='pageData'
        @pageChangeEvent='handlerPageChange'>
    </page>
  </div>
</template>

<script>
import commentListItem from './comment-list-item'
import page from '../common/page/page'
export default {
  components: {
    commentListItem,
    page,
  },
  mounted() {
    
  },
  props:{
    infoData: Object,
    commentList: Array,
    pageData: Object,
  },
  data() {
    return {
        // 对于某一个 消息 的 评论
        /*dataList: [
            {
                commentId:1,
                infoId:1,
                uid:2,
                toId:1,
                commentContent:"评论1",
                replyNum: 2,
                createTime: '2021/05/10 18:41:12',
                nickName: '老朱',
                portrait:'',
            },{
                commentId:2,
                infoId:1,
                uid:3,
                toId:1,
                commentContent:"评论2",
                replyNum: 0,
                createTime: '2021/05/10 18:45:12',
                nickName: '43',
                portrait:'',
            },
            
        ],*/
        pageIndex: 1,
        pageSize: 10,
        totalPage: 0,
    }
  },
  methods: {
    // 页面发生修改时
    handlerPageChange(data){
        console.log("comment-list：页面发生修改", data)
        this.$emit('pageChangeEvent', data);
    }
  },
}
</script>

<style>

</style>